﻿using ClockInLearning.Db;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ClockInLearning.Dto
{
    public class PointsRegistRecordBaseDto : BaseDto<Guid>
    {
        public Guid UserId { get; set; }
        public Guid RegisterId { get; set; }
        public OperationTypeEnum OperationType { get; set; }
        public RegistTypeEnum RegistType { get; set; }
        public DateTime RegistTime { get; set; }
        public int RegistDuration { get; set; }
        public int Points { get; set; }
        public string Remark { get; set; }
    }

    public class PointsRegistRecordInputDto : PointsRegistRecordBaseDto
    {
    }

    public class UsedPointRegistDto
    {
        public int PrivatePointsRegistDuration { get; set; }
        public int PrivatePoints { get; set; }
        public int RecognizedPointsRegistDuration { get; set; }
        public int RecognizedPoints { get; set; }
        public DateTime RegistTime { get; set; }
        public string Remark { get; set; }
    }

    public class PointsRegistRecordQueryDto
    {
        public Guid UserId { get; set; }
        public string UserName { get; set; }
        public Guid RegisterId { get; set; }
        public string RegisterName { get; set; }
        public OperationTypeEnum OperationType { get; set; }
        public RegistTypeEnum RegistType { get; set; }
        public DateTime BeginTime { get; set; }
        public DateTime EndTime { get; set; }
    }

    public class QueryMonthDto
    {
        public int Year { get; set; }
        public int Month { get; set; }
    }

    public class PointsRegistRecordOutputDto : PointsRegistRecordBaseDto
    {
        public string UserName { get; set; }
        public string RegisterName { get; set; }
    }

    public class CalendarRegistRecordDto
    {
        public DateTime RecordDateTime { get; set; }

        public string Date => RecordDateTime.ToString("yyyy-MM-dd");

        public string Info { get; set; }

        public List<PointsRegistRecordOutputDto> Data { get; set; }
    }
}
